package exception;

import java.util.Arrays;
import java.util.function.Supplier;

/**
 * Description: 自定义异常
 *
 * @author code-worker
 * @date 2021/10/09 18:42
 */
public class CustomException extends RuntimeException{
    /**
     * task: 包含栈异常记录
     * @author code-worker
     * @date 2021/10/9 18:47
     * @param message message
     * @param cause cause
     */
    public CustomException(String message, Throwable cause){
        super(message, cause);
    }

    /**
     * task: 栈异常记录可选
     * @author code-worker
     * @date 2021/10/9 18:51
     * @param message message
     * @param writableStackTrace 是否包含异常记录
     */
    public CustomException(String message, boolean writableStackTrace){
        super(message, null, false, writableStackTrace);
    }

    /**
     * task: 不包含异常记录
     * @author code-worker
     * @date 2021/10/9 18:52
     * @param message message
     */
    public CustomException(String message){
        this(message, false);
    }
}
